package cn.com.aiton.common.utils;

import java.util.ArrayList;
import java.util.List;

public class ScheduleControlModeItem {
    public static List<ControlModeItem> getControlModeCollection(){
        List<ControlModeItem> items = new ArrayList<>();
        items.add(new ControlModeItem(0,"自主控制"));
        items.add(new ControlModeItem(1,"关灯"));
        items.add(new ControlModeItem(2,"黄闪"));
        items.add(new ControlModeItem(3,"全红"));
        items.add(new ControlModeItem(6,"感应"));
        items.add(new ControlModeItem(7,"无电缆协调"));
        items.add(new ControlModeItem(8,"单点优化"));
        items.add(new ControlModeItem(11,"主从线控"));
        items.add(new ControlModeItem(12,"系统优化"));
        items.add(new ControlModeItem(13,"干预控制"));
        return items;
    }
    public static class ControlModeItem{
        private int code;
        private String name;

        public ControlModeItem() {
        }

        public ControlModeItem(int code, String name) {
            this.code = code;
            this.name = name;
        }

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }

    public static String int2String(int i){
        String str = "";
        switch (i){
            case 0:
                str = "0-自主控制";
                break;
            case 1:
                str = "1-关灯";
                break;
            case 2:
                str = "2-黄闪";
                break;
            case 3:
                str = "3-全红";
                break;
            case 6:
                str = "6-感应";
                break;
            case 7:
                str = "7-无电缆协调";
                break;
            case 8:
                str = "8-单点优化";
                break;
            case 11:
                str = "11-主从控制";
                break;
            case 12:
                str = "12-系统优化";
                break;
            case 13:
                str = "13-干预控制";
                break;
                default:
        }
        return str;
    }
}
